home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / wheels2.arc / POPSCREN.LIB < prev    next >
Text File  |  1985-06-28  |  2KB  |  43 lines

  1. {@@@@@@@@@@@ copyright (C) 1984 by Neil J. Rubenking @@@@@@@@@@@@@@@@@@@@@@@@
  2. The purchaser of these procedures and functions may include them in COMPILED
  3. programs freely, but may not sell or give away the source text.
  4.  
  5.     The type declarations for this procedure reside in the file
  6.     SCREENS.TYP, which MUST be $INCLUDEd.
  7.  
  8.     Since a variable of type SCREEN is exactly the same "shape"
  9.     as the TextMode screen memory, you can change the whole screen
  10.     in an instant by first declaring a SCREEN variable "on top"
  11.     of the screen memory (using the "absolute" statement) and
  12.     then simply changing the value of that variable.
  13.  
  14.     The procedure MakeScreen turns a simple string[80] into
  15.     a ScreenLine by filling in any trailing blanks and giving
  16.     each character the specified attribute.
  17.  
  18.     To create a whole screen, you use MakeScreen on each of its
  19.     25 lines--that breaks it into manageable chunks.  It can get
  20.     a bit hard to look at in the listing--I suggest FIRST designing
  21.     the screen and THEN breaking it up into lines.  Alternatively,
  22.     you might save the whole screen in a file and read each line
  23.     into memory when the program initializes.}
  24.  
  25.  
  26. {@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@}
  27. procedure MakeScreen(VAR Line : ScreenLine ; att: byte;theLine : LineType);
  28. var
  29.   row : byte;
  30. begin
  31.   for row := 1 to length(theLine) do
  32.     begin
  33.       Line[row].character := theLine[row];
  34.       Line[row].attribute := att;
  35.     end;
  36.   if length(theLine) < 80 then
  37.     for row := length(theLine) + 1 to 80 do
  38.       begin
  39.         Line[row].character := ' ';
  40.         Line[row].attribute := att;
  41.       end;
  42. end;
  43. {@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@}